package cate.game.role.pvp.eliterace.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;

import static cate.game.client.msg.MsgSender.send;
import static cate.game.client.msg.id.MsgIdBEliteRace.DATA_REQ;

@ClientMsg(title = "精英赛 数据 请求")
public class EliteRaceDataReq implements MsgInput {

    @Override
    public MsgConfig conf() {
        return DATA_REQ;
    }

    @Override
    public void execute(GameBody game, ClientContext cc) {
        send(cc::sendNow, new EliteRaceDataResp(
                game.pvp.eliteRace.getDataManager().getData().getSpec(),
                cc.getRole().getPvp().eliteRace
        ));
    }
}
